<template>
  <div>
    <div class="head-container">
        <crudOperation show="" :permission="permission"/>
        <pagination />
    </div>
    <el-table ref="table" :data="crud.data" v-loading="crud.loading" max-height="300px">
        <el-table-column type="index" label="序号" width="55"/>
        <el-table-column label="父集群" prop="cmName" />
        <el-table-column label="子集群" prop="clusterName" />
        <el-table-column label="模型名" prop="modelName" />
        <el-table-column label="使用次数" prop="count" />
        <el-table-column label="时间" prop="createTime" show-overflow-tooltip />
    </el-table>
  </div>
</template>
<script>
import CRUD, { presenter, header, form, crud } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
const defaultCrud = CRUD({
  title: '模型详情',
  url: '/api/cmStatementAudit/selectModelDetails'
})
  export default {
    components:{crudOperation, rrOperation, udOperation ,pagination},
    mixins: [presenter(defaultCrud), header(), crud()],
    props:["modelData"],
    data() {
      return {
       permission:{
        add: ['add'],
        edit:['edit'],
        del:['del']
       },
      };
    },
    watch:{
      modelData:{
        immediate:true,
        deep:true,
        handler(val){
            this.query.type = val.module
            this.query.startTime=val.startTime
            this.query.endTime=val.endTime
            this.crud.refresh()
        }
      }
    },
    created(){
      this.query.type = this.modelData.module
      this.query.startTime=this.modelData.startTime
      this.query.endTime=this.modelData.endTime
    },
    mounted(){
    },
    methods:{
    }
  }
</script>
